﻿using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

// Token: 0x0200016D RID: 365
public class CoordinateLoadUI : LoadUI
{
	// Token: 0x06000985 RID: 2437 RVA: 0x000382BC File Offset: 0x000364BC
	private void Awake()
	{
		this.buttonAll.onClick.AddListener(new UnityAction(this.ShortCut_All));
		this.buttonNone.onClick.AddListener(new UnityAction(this.ShortCut_None));
		this.buttonWear.onClick.AddListener(new UnityAction(this.ShortCut_Wear));
		this.buttonAcce.onClick.AddListener(new UnityAction(this.ShortCut_Acce));
		this.buttonLoad.onClick.AddListener(new UnityAction(this.Load));
		this.buttonCancel.onClick.AddListener(new UnityAction(this.Cancel));
	}

	// Token: 0x06000986 RID: 2438 RVA: 0x00038374 File Offset: 0x00036574
	public override void Setup(Sprite thumbnail, string name, string file, Action<int> loadAct)
	{
		this.cardImage.sprite = thumbnail;
		this.nameText.text = name;
		this.file = file;
		this.loadAct = loadAct;
		base.gameObject.SetActive(true);
	}

	// Token: 0x06000987 RID: 2439 RVA: 0x000383AC File Offset: 0x000365AC
	private void Update()
	{
		this.buttonLoad.interactable = (this.checkWear.isOn || this.checkAccessory.isOn);
	}

	// Token: 0x06000988 RID: 2440 RVA: 0x000383D8 File Offset: 0x000365D8
	private void ShortCut_All()
	{
		this.checkWear.isOn = true;
		this.checkAccessory.isOn = true;
	}

	// Token: 0x06000989 RID: 2441 RVA: 0x000383F4 File Offset: 0x000365F4
	private void ShortCut_None()
	{
		this.checkWear.isOn = false;
		this.checkAccessory.isOn = false;
	}

	// Token: 0x0600098A RID: 2442 RVA: 0x00038410 File Offset: 0x00036610
	private void ShortCut_Wear()
	{
		this.checkWear.isOn = true;
		this.checkAccessory.isOn = false;
	}

	// Token: 0x0600098B RID: 2443 RVA: 0x0003842C File Offset: 0x0003662C
	private void ShortCut_Acce()
	{
		this.checkWear.isOn = false;
		this.checkAccessory.isOn = true;
	}

	// Token: 0x0600098C RID: 2444 RVA: 0x00038448 File Offset: 0x00036648
	private int CalcFilter()
	{
		int num = 0;
		if (this.checkWear.isOn)
		{
			num |= 8;
		}
		if (this.checkAccessory.isOn)
		{
			num |= 16;
		}
		return num;
	}

	// Token: 0x0600098D RID: 2445 RVA: 0x00038484 File Offset: 0x00036684
	private void Load()
	{
		int obj = this.CalcFilter();
		this.loadAct(obj);
		base.gameObject.SetActive(false);
	}

	// Token: 0x0600098E RID: 2446 RVA: 0x000384B0 File Offset: 0x000366B0
	private void Cancel()
	{
		base.gameObject.SetActive(false);
	}

	// Token: 0x0400095F RID: 2399
	[SerializeField]
	private Image cardImage;

	// Token: 0x04000960 RID: 2400
	[SerializeField]
	private Text nameText;

	// Token: 0x04000961 RID: 2401
	[SerializeField]
	private Toggle checkWear;

	// Token: 0x04000962 RID: 2402
	[SerializeField]
	private Toggle checkAccessory;

	// Token: 0x04000963 RID: 2403
	[SerializeField]
	private Button buttonAll;

	// Token: 0x04000964 RID: 2404
	[SerializeField]
	private Button buttonWear;

	// Token: 0x04000965 RID: 2405
	[SerializeField]
	private Button buttonAcce;

	// Token: 0x04000966 RID: 2406
	[SerializeField]
	private Button buttonNone;

	// Token: 0x04000967 RID: 2407
	[SerializeField]
	private Button buttonLoad;

	// Token: 0x04000968 RID: 2408
	[SerializeField]
	private Button buttonCancel;

	// Token: 0x04000969 RID: 2409
	private string file;

	// Token: 0x0400096A RID: 2410
	private Action<int> loadAct;
}
